QuickDraw GX Coordinates
All coordinates in QuickDraw GX are specified with fixed-point numbers in the range
of -32,768.0 to approximately 32,768.0. Fixed-point numbers and the functions for manipulating them are described in the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities. For any coordinate space, point (0.0, 0.0) represents the origin of the space. Points that lie to the right of the origin increase in a positive direction along the x-axis; points that lie below the origin increase in a positive direction along the y-axis. Coordinates are always written in the order (x, y).Figure 7-13 shows the general layout of the QuickDraw GX coordinate plane, with an expanded portion that shows a rectangle 200 units wide by 100 units high, whose upper-left corner is at the point (200.0, 100.0).
Figure 7-13 The QuickDraw GX coordinate plane
QuickDraw GX allows you to work in four coordinate spaces: geometry space, local space, global space, and device space. You can work separately in each space as appropriate for specific purposes; QuickDraw GX automatically converts among them when drawing.
The following discussion of coordinate spaces follows the progress of a drawing operation. It uses as an example the rendering of a single shape in a single window on a single view device. The shape, as finally displayed, is shown in Figure 7-19 on page 7-39. More complex possibilities, such as displaying in multiple windows and on multiple devices, are discussed as they arise.